package org.dfyy.postgisdemo.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.dfyy.postgisdemo.pojo.DmTrade;
import org.dfyy.postgisdemo.service.DmTradeService;
import org.dfyy.postgisdemo.mapper.DmTradeMapper;
import org.dfyy.postgisdemo.uitls.ResponseUtil;
import org.dfyy.postgisdemo.uitls.ResultUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author 书山
* @description 针对表【dm_trade】的数据库操作Service实现
* @createDate 2024-05-23 23:16:27
*/
@Service
public class DmTradeServiceImpl extends ServiceImpl<DmTradeMapper, DmTrade>
    implements DmTradeService{

    @Autowired
    private DmTradeMapper dmTradeMapper;

    @Override
    public ResultUtil<List<DmTrade>> queryDm(DmTrade dm) {

        List<DmTrade> allByAmountDmTrades = dmTradeMapper.getAllByAmountDmTrades(dm);

        return ResponseUtil.ok(allByAmountDmTrades);
    }
}




